#ifndef SCAN_CHECK_H
#define SCAN_CHECK_H

#include "http_get.h"
#include <QTimer>

class Scan_Check : public Http_Get
{
    Q_OBJECT
public:
    Scan_Check(QString uuid, Http_Get* parent = 0);
    virtual ~Scan_Check();

    Q_INVOKABLE void get(QString &uuid, QString tip);

    void printf_qrcode(const QString qrcode);
Q_SIGNALS:
    void error();
    void scanedButWaitConfirm();
    void scanedAndConfirmed(QString redirect_uri);

protected:
    void finished(QNetworkReply* reply);

public slots:
    void timer_to_scan();

private:
    QString m_uuid;
    QString m_tip;

    QTimer *scan_timer;
};

#endif // SCAN_CHECK_H
